<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>员工信息</title>
        <style type="text/css">
           a{
	     color: black;
             }
       </style>
    </head>
    <body>
        <center>
            <form action="">
                <table  border="1" cellspacing="0" cellpadding="0">
                        <th>ID</th>
                        <th>姓名</th>
                        <th>所属部门</th>
                        <th>头像</th>
                        <th>出生日期</th>
                        <th>入职时间</th>
                        <th>相关操作</th>
                        <?php
                            $link=mysql_connect($servername='127.0.0.1', $username='root', $password="");
                            mysql_select_db("bbs");
                            mysql_query("set names utf8");
                            $exec="select * from stafftable";
                            $result=mysql_query($exec);
                            while($rs=mysql_fetch_object($result)){
                                $id=$rs->id;
                                $name=$rs->name;
                                $department=$rs->department;
                                $avater=$rs->avater;
                                $birthdate=$rs->birthdate; 
                                $hiredate=$rs->hiredate;                     
                        ?>
                    <tr align="">
                    <td><?php echo $id ?></td>
                    <td><?php echo $name ?></td>
                    <td><?php echo $department ?></td>
                    <td><img src="<?php echo $avater ?>"></td>
                    <td><?php echo $birthdate ?></td>
                    <td><?php echo $hiredate?></td>
                    <td >
                        <a href="#" style="text-decoration: none;" >编辑</a>&nbsp;
                        <a href="#" style="text-decoration: none;">删除</a>
                    </td>
                </tr>
                <?php
                    }
                    mysql_close();
                ?>
                </table>
            </form>
        </center>
    </body>
</html>